package com.oig.sys.msg.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

@Data
public class NoticeMsgFileDto {

    @Schema(description = "主键id")
    private Integer id;

    @Schema(description = "业务附件类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,业务附件类型不能为空", groups= {GroupAdd.class, GroupEdit.class})
    private String formalType;
    @Schema(description = "文件类型")
    private String fileType;
    @Schema(description = "文件id，相对路径", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,文件id，相对路径不能为空", groups= {GroupAdd.class, GroupEdit.class})
    private String fileId;
    @Schema(description = "原文件名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,原文件名称不能为空", groups= {GroupAdd.class, GroupEdit.class})
    private String fileName;
    @Schema(description = "文件url，完整路径")
    private String fileUrl;
    @Schema(description = "业务编码,文件里本身的业务号")
    private String fileNumber;

}
